﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace XCommunity.Forums.Extension
{
  public class PostExtMeta
  {


    /// <summary>
    /// 支持的用户列表
    /// </summary>
    public string[] Assents
    {
      get;
      internal set;
    }


    /// <summary>
    /// 反对的用户列表
    /// </summary>
    public string[] Dissents
    {
      get;
      internal set;
    }


    /// <summary>
    /// 表示已阅的用户列表
    /// </summary>
    public string[] Reads
    {
      get;
      internal set;
    }


    /// <summary>
    /// 对该帖子表示支持
    /// </summary>
    public void ExpressAssent()
    {
      IIdentity account = GetAccount();
    }

    private IIdentity GetAccount()
    {
      throw new NotImplementedException();
    }

    /// <summary>
    /// 对该帖子表示反对
    /// </summary>
    public void ExpressDissent()
    {

    }

    /// <summary>
    /// 对该帖子表示已阅
    /// </summary>
    public void ExpressRead()
    {

    }


    /// <summary>
    /// 指示当前用户是否已经投过票了
    /// </summary>
    internal bool IsVoted( IIdentity account )
    {
      return Assents.Contains( account.Name ) || Dissents.Contains( account.Name ) || Reads.Contains( account.Name );
    }



    internal object GetValue( string p )
    {
      throw new NotImplementedException();
    }
  }
}
